home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
Moof
/
Goodies
/
MPW Goodies
/
MPW Goodies⁄DTS
/
CheckInAll
< prev
next >
Wrap
Text File
|
2022-08-05
|
3KB
|
90 lines
#
# File: CheckInAll
#
# Contains: Script which checks in all files in current
# project.
#
# Written by: Bruce Horn, Steve Capps, Larry Kenyon,
# John Meier, scott douglass, Darin Adler,
# Paul Mercer, Bryan Stearns, Dave Owens
#
# Copyright: © 1988 by Apple Computer, Inc., all rights reserved.
#
# Change History:
#
# 2/17/89 sad use ProjectInfo -s; redirect to {somewhere}
# 11/17/88 sad fix Can’t parse logic
# 11/4/88 sad fix so actually works, current project only
# 11/4/88 sad cloned from OpenCheckedOut
#
# To Do:
# Can’t handle file names with spaces.
#
Set Exit 0
Set CaseSensitive 0
# the following helps to debug until MPW sends echos to Dev:Console instead of Dev:StdErr
If {Echo} == 1
Set somewhere "∑∑ '{Worksheet}∂'"
Else
Set somewhere '∑ Dev:Null'
End
Begin
# first get all the check-out directories for the current project
Confirm "Do you want to check in all modifiable files in the project “`Project -q`”?"
Exit {Status} If {Status} != 0
Set CheckOutDirs "`CheckOutDir -r; Set CheckOutDirStatus {Status} ; Echo ""`"
Exit {CheckOutDirStatus} If {CheckOutDirStatus} != 0
Loop
Break If "{CheckOutDirs}" !~ / *CheckOutDir +-project ∂'«0,1»([¬:]+∫)®1∂'«0,1» ∂'«0,1»([¬∫]*:)®2∂'«0,1» (≈)®3/
Set Project "{®1}"
Set CheckOutDir "{®2}"
Set CheckOutDirs "{®3}"
# now for each directory, get all modified files in the project
Set Info "`ProjectInfo -s -a "{User}" -m -project "{Project}"; Set ProjectInfoStatus {Status}`"
# *** check status here
Set FirstNotOpened ""
Set OthersNotOpened ""
# If "{Info}" =~ /[¬,]+∫( «0,1»≈)®1/
# Set Info "{®1}"
# End
Loop
Break If "{Info}" !~ /[¬+]* ([¬,]+)®1,[0-9.a-z]+∂+ (≈)®2/
Set File "{®1}"
Set Info "{®2}"
If "`Exists "{CheckOutDir}{File}"`" == ""
If "{FirstNotOpened}" == ""
Set FirstNotOpened "“{File}”"
Else
Set OthersNotOpened "{OthersNotOpened}, “{File}”"
End
Else
CheckIn "{CheckOutDir}{File}" ∑∑ "{Worksheet}"
End
End
# If "{Info}" != ""
# Echo "### CheckInAll - Couldn’t parse: " "{Info}" ∑∑ "{Worksheet}"
# Exit 1
# End
If "{FirstNotOpened}" != ""
If "{OthersNotOpened}" == ""
Alert "{FirstNotOpened} is checked out from “`Project -q`” but is not in the “{CheckOutDir}” directory."
Else
Alert "The following files are checked out from “`Project -q`” but are not in the “{CheckOutDir}” directory: {FirstNotOpened}{OthersNotOpened}."
End
End
End
If "{CheckOutDirs}" != ""
Echo "### CheckInAll - Couldn’t parse: " "{CheckOutDirs}" ∑∑ "{Worksheet}"
Exit 1
End
End {somewhere}